package com.ecommerce.order.events;

import com.ecommerce.order.entity.Order;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 订单创建事件
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderCreatedEvent {
    private Order order;
    
    public OrderCreatedEvent(Long id, String orderNo, Long userId, java.time.LocalDateTime createTime) {
        this.order = new Order();
        this.order.setId(id);
        this.order.setOrderNo(orderNo);
        this.order.setUserId(userId);
        this.order.setCreateTime(createTime);
    }
}